package com.lazybones.base.engineer.entity.file;


import com.lazybones.base.engineer.entity.base.BaseEntity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Table(value = "system_sys_file",dataSource = "ds")
public class SystemFileInfo extends BaseEntity implements Serializable {
    @Id(value = "file_id",keyType = KeyType.Auto)
    private int file_id;
    @Column(value = "business_id",jdbcType = JdbcType.VARCHAR)
    private String businessId;
    @Column(value = "bus_mode",jdbcType = JdbcType.VARCHAR)
    private String busMode;
    @Column(value = "server_file_name",jdbcType = JdbcType.VARCHAR)
    private String  serverFileName;
    @Column(value = "file_name",jdbcType = JdbcType.VARCHAR)
    private String fileName;
    @Column(value = "file_type",jdbcType = JdbcType.VARCHAR)
    private String fileType;
    @Column(value = "file_url",jdbcType = JdbcType.VARCHAR)
    private String fileUrl;
    @Column(value = "file_size",jdbcType = JdbcType.DECIMAL)
    private BigDecimal fileSize;
    @Column(value = "source_type",jdbcType = JdbcType.VARCHAR)
    private String sourceType;
    @Column(value = "chunk_flag",jdbcType = JdbcType.INTEGER)
    private int chunkFlag;
    @Column(value = "chunk_folder",jdbcType = JdbcType.VARCHAR)
    private String chunkFolder;
    @Column(value = "chunk_md5",jdbcType = JdbcType.VARCHAR)
    private String chunkMd5;
    @Column(value = "shard_total",jdbcType = JdbcType.DECIMAL)
    private BigDecimal shardTotal;
    @Column(value = "shard_index",jdbcType = JdbcType.DECIMAL)
    private BigDecimal shardIndex;
    @Column(value = "shard_size",jdbcType = JdbcType.DECIMAL)
    private BigDecimal shardSize;

    public SystemFileInfo(int fileId, String businessId, String busMode, String serverFileName, String fileName, String fileType, String fileUrl, BigDecimal fileSize, String sourceType, int chunkFlag, String chunkFolder, String chunkMd5, BigDecimal shardTotal, BigDecimal shardIndex, BigDecimal shardSize) {
        file_id = fileId;
        this.businessId = businessId;
        this.busMode = busMode;
        this.serverFileName = serverFileName;
        this.fileName = fileName;
        this.fileType = fileType;
        this.fileUrl = fileUrl;
        this.fileSize = fileSize;
        this.sourceType = sourceType;
        this.chunkFlag = chunkFlag;
        this.chunkFolder = chunkFolder;
        this.chunkMd5 = chunkMd5;
        this.shardTotal = shardTotal;
        this.shardIndex = shardIndex;
        this.shardSize = shardSize;
    }

    public SystemFileInfo(Date createTime, Date updateTime, String createUser, String updateUser, String creteUserId, String updateUserId, int fileId, String businessId, String busMode, String serverFileName, String fileName, String fileType, String fileUrl, BigDecimal fileSize, String sourceType, int chunkFlag, String chunkFolder, String chunkMd5, BigDecimal shardTotal, BigDecimal shardIndex, BigDecimal shardSize) {
        super(createTime, updateTime, createUser, updateUser, creteUserId, updateUserId);
        file_id = fileId;
        this.businessId = businessId;
        this.busMode = busMode;
        this.serverFileName = serverFileName;
        this.fileName = fileName;
        this.fileType = fileType;
        this.fileUrl = fileUrl;
        this.fileSize = fileSize;
        this.sourceType = sourceType;
        this.chunkFlag = chunkFlag;
        this.chunkFolder = chunkFolder;
        this.chunkMd5 = chunkMd5;
        this.shardTotal = shardTotal;
        this.shardIndex = shardIndex;
        this.shardSize = shardSize;
    }

    public SystemFileInfo(Date createTime, Date updateTime, String createUser, String updateUser, String creteUserId, String updateUserId, int fileId) {
        super(createTime, updateTime, createUser, updateUser, creteUserId, updateUserId);
        file_id = fileId;
    }
    public SystemFileInfo() {
        super();
    }

    public int getFile_id() {
        return file_id;
    }

    public void setFile_id(int file_id) {
        this.file_id = file_id;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getBusMode() {
        return busMode;
    }

    public void setBusMode(String busMode) {
        this.busMode = busMode;
    }

    public String getServerFileName() {
        return serverFileName;
    }

    public void setServerFileName(String serverFileName) {
        this.serverFileName = serverFileName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public BigDecimal getFileSize() {
        return fileSize;
    }

    public void setFileSize(BigDecimal fileSize) {
        this.fileSize = fileSize;
    }

    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    public int getChunkFlag() {
        return chunkFlag;
    }

    public void setChunkFlag(int chunkFlag) {
        this.chunkFlag = chunkFlag;
    }

    public String getChunkFolder() {
        return chunkFolder;
    }

    public void setChunkFolder(String chunkFolder) {
        this.chunkFolder = chunkFolder;
    }

    public String getChunkMd5() {
        return chunkMd5;
    }

    public void setChunkMd5(String chunkMd5) {
        this.chunkMd5 = chunkMd5;
    }

    public BigDecimal getShardTotal() {
        return shardTotal;
    }

    public void setShardTotal(BigDecimal shardTotal) {
        this.shardTotal = shardTotal;
    }

    public BigDecimal getShardIndex() {
        return shardIndex;
    }

    public void setShardIndex(BigDecimal shardIndex) {
        this.shardIndex = shardIndex;
    }

    public BigDecimal getShardSize() {
        return shardSize;
    }

    public void setShardSize(BigDecimal shardSize) {
        this.shardSize = shardSize;
    }

    @Override
    public String toString() {
        return "SystemFileInfo{" +
                "file_id=" + file_id +
                ", businessId='" + businessId + '\'' +
                ", busMode='" + busMode + '\'' +
                ", serverFileName='" + serverFileName + '\'' +
                ", fileName='" + fileName + '\'' +
                ", fileType='" + fileType + '\'' +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileSize=" + fileSize +
                ", sourceType='" + sourceType + '\'' +
                ", chunkFlag=" + chunkFlag +
                ", chunkFolder='" + chunkFolder + '\'' +
                ", chunkMd5='" + chunkMd5 + '\'' +
                ", shardTotal=" + shardTotal +
                ", shardIndex=" + shardIndex +
                ", shardSize=" + shardSize +
                '}';
    }
}
